{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "85a8fc3f",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "# 导言区"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "f397dd62",
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import scipy.constants as sc\n",
    "from CoolProp.CoolProp import PropsSI as psi\n",
    "import matplotlib.pyplot as plt\n",
    "from Functions.UnsteadyStateConduction import *\n",
    "from Functions.Self_defined import check_Fo\n",
    "from scipy.integrate import solve_bvp\n",
    "from Functions.Self_defined import find_nearest"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "79c7c6af",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "## 习题03-01"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "daa3b372",
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "所需时间分别为：\n",
      "42 s\n",
      "69 s\n",
      "552 s\n",
      "12075 s\n",
      "45964 s\n"
     ]
    }
   ],
   "source": [
    "delta = 30e-3\n",
    "t_0 = 20\n",
    "t_w = 60\n",
    "t_m = 56\n",
    "a_list = np.array([170e-6, 103e-6, 12.9e-6, 0.59e-6, 0.155e-6])\n",
    "\n",
    "guess_value = 1\n",
    "tau_list = []\n",
    "for a in a_list:\n",
    "    x = delta / 2\n",
    "    tau = root(lambda tau: t_x_for_constant_t_w(x, tau, t_0, t_w, a) - t_m, guess_value).x[0]\n",
    "    tau_list.append(tau)\n",
    "print(f'所需时间分别为：')\n",
    "for tau in tau_list:\n",
    "    print(f'{tau:.0f} s')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8ea4140c",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "## 习题03-09"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "89fb1fcc",
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "两种情况下，热电偶的时间常数分别为:36.10 s和 18.05 s\n"
     ]
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEFCAYAAAD5bXAgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAA0XUlEQVR4nO3dd3xUdb7/8dcnvRNSaAkh9N5DFRBUQIWVxe5a1opr2fW3Rdere/W6Xl12bWtbvay66trr4q6KBQWRIobeewuBJKT3MvP9/XEOEGCAJMzMmSSf5+Mxjzlz5pwzHwY47znne873K8YYlFJKqeMFOV2AUkqpwKQBoZRSyiMNCKWUUh5pQCillPJIA0IppZRHIU4X4C1JSUkmPT3d6TKUUqpZWbFixSFjTLKn91pMQKSnp5OZmel0GUop1ayIyJ6TvaenmJRSSnmkAaGUUsojDQillFIeaUAopZTySANCKaWURxoQSimlPArogBCRe0Vksf0Y7XQ9SinVmgTsfRAi0g+4EBgHpAEfAhmOFqWU8j5jwF0HbhcYl/XsrgPjPs28+uu4rWfjth/GesbUe22Oe338+15ensPzaOI0R6cPf08nm47rBBk3ePNvBQjggADGA18Ya8CKPSISIiJxxpiSwwuIyCxgFkBaWppDZSoV4IyBumqoq7SeayuhrqoBz1XgqgZXrf2oAXe9aVcNuOqOTrvrTddfx1V7dL3DO3h33dEd/9E9oWqq1BGtLiASgaJ6r8vseUcCwhgzB5gDkJGRof/KVMtSVwNVRVBZaD+KoLoEqkuhpgyqy6CmHGpK7emyo8/1p2srafpOWCA4zH6EHJ0OqjcdHGo/wiA8FoLqvT683uF5EgxB9kPqP4dAUFC990Ps6aB67wefen0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oAoxPqFdlg81jjZAUNEUrB+Ob5ljHkdqJWjQ3HF43y99wD/NMbU7yum/vcaj/M1HlYFfGaMqTbGbMX6TxYfYN8nWN/pEmNML2AIVgBHBmCdh3n6+w7I/1sicgnwHDDDGHOAAKtTREI58QcXOFRnaw+IRVjneBGRrkCtfZgZEESkI/AlcL8x5iV7dibWIT1Yp0wWOVFbPecD14vIAqyd2etYp0Sm2u8HQo2HLQXOsxuBO2Kd551HYH2fANHAQXs6HyjGOqUQaHUetogT/763AV1EJF5EwrBq/8Gh+gAQkWuw2kfOMcZst2cvB8aKSKiIxAM9gS0OlQgwFKu98QPgHaCfiDyBQ99nqx5Rzhiz3r7yYhEQjNVwFUjuxTqM/IOI/MGedwfwrH1qZxNWo6tjjDGHd1rYIfELrJ4nXxORG4Bc4AZnqjvBe8BwYIn9+jZgN/BSoHyftseAf4jIDKz/o/dghW6g1XnYbI77+zbG1InIb7HaJIKA540xOU4VaLfnPIt1ocdH9sHYQmPMgyLyNLAA67u+2xhT7VSdxpjlwAAAEUkH3jHG/NZ+7ffvU++kVkop5VFrP8WklFLqJDQglFJKeaQBoZRSyiMNCKWUUh5pQCillPJIA0IppZRHGhBKKaU8atU3yinlS3bHjwuBMKArVkdwVcBYY4z7VOsqFQj0RjmlfExERmJ1lzLD6VqUagw9xaSU7w0ANjhdhFKNpQGhlO/1w+pLSalmRQNCKd/rxNHeWZVqNjQglPK9L4CXReRspwtRqjG0kVoppZRHegShlFLKIw0IpZRSHmlAKKWU8kgDQimllEcaEEoppTzSgFBKKeWRBoRSSimP/j//lIMBSKRYOAAAAABJRU5ErkJggg==\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "c = 2.094e3\n",
    "t_0 = 20\n",
    "t_oo = 320\n",
    "h_list = np.array([58, 116])\n",
    "tau_c_list = c / h_list\n",
    "print(f'两种情况下，热电偶的时间常数分别为:{tau_c_list[0]:.2f} s和 {tau_c_list[1]:.2f} s')\n",
    "theta_0 = t_0 - t_oo\n",
    "tau = np.linspace(0, 4 * max(tau_c_list), 1000)\n",
    "fig, ax = plt.subplots()\n",
    "for tau_c in tau_c_list:\n",
    "    theta = theta_0 * np.exp(-tau/tau_c)\n",
    "    ax.plot(tau, theta, label=rf'$\\tau_c = {tau_c:.2f}$ s')\n",
    "ax.set_xlabel(r'$\\tau$')\n",
    "ax.set_ylabel(r'$\\theta$')\n",
    "ax.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "65d7b32d",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "## 习题03-10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "4094abc2",
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "d = 6.18e-04 m\n",
      "如果考虑气流与热接点之间的辐射换热，则h增大，则V/A增大，d增大\n"
     ]
    }
   ],
   "source": [
    "t_0 = 25\n",
    "t_oo = 200\n",
    "tau_c = 1\n",
    "h = 350\n",
    "lambda_ = 20\n",
    "c = 400\n",
    "rho = 8500\n",
    "\n",
    "\n",
    "def expression(p):\n",
    "    d = p\n",
    "    V = 4/3 * np.pi * (d/2)**3\n",
    "    A = 4 * np.pi * (d/2)**2\n",
    "    xpr = tau_c - rho * c * V / (h * A)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_value = 1\n",
    "d = root(expression, guess_value).x[0]\n",
    "print(f'd = {d:.2e} m')\n",
    "print('如果考虑气流与热接点之间的辐射换热，则h增大，则V/A增大，d增大')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f1630f29",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "## 习题03-11"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "cbee7d1c",
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "导线刚通电瞬间的温升率为：1.46 C/s\n"
     ]
    }
   ],
   "source": [
    "m_l = 3.45e-3\n",
    "c = 460\n",
    "R_l = 3.63e-2\n",
    "I = 8\n",
    "\n",
    "dT_dtau = I**2 * R_l / (m_l * c)\n",
    "print(f'导线刚通电瞬间的温升率为：{dT_dtau:.2f} C/s')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "61e0b275",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "## 习题03-13"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "deb56db1",
   "metadata": {
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "可以使用集中参数法\n",
      "所需时间为：3633 s\n"
     ]
    }
   ],
   "source": [
    "delta = 20e-3\n",
    "t_0 = 500\n",
    "t_oo = 20\n",
    "h = 35\n",
    "lambda_ = 45\n",
    "a = 1.37e-5\n",
    "Delta_t = 10\n",
    "t = t_oo + Delta_t\n",
    "\n",
    "l_c = delta / 2\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "if Bi < 0.1:\n",
    "    print(f'可以使用集中参数法')\n",
    "\n",
    "    theta_m_to_theta_0 = (t - t_oo) / (t_0 - t_oo)\n",
    "    tau_c = get_tau_c(l_c, lambda_, a, h)\n",
    "    tau = -tau_c * np.log(theta_m_to_theta_0)\n",
    "    print(f'所需时间为：{tau:.0f} s')"
   ]
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-14"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "可以使用集中参数法\n",
      "所需时间为：5265 s\n"
     ]
    }
   ],
   "source": [
    "carbon_percentage = 0.5e-2\n",
    "t_0 = 600\n",
    "t_oo = 20\n",
    "m = 7.84\n",
    "area = 870e-4\n",
    "c = 418.7\n",
    "rho = 7840\n",
    "h = 29.1\n",
    "Delta_t = 10\n",
    "t = t_oo + Delta_t\n",
    "\n",
    "lambda_ = 49.8\n",
    "\n",
    "V = m / rho\n",
    "l_c = V / area\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "if Bi < 0.1:\n",
    "    print(f'可以使用集中参数法')\n",
    "    theta_m_to_theta_0 = (t - t_oo) / (t_0 - t_oo)\n",
    "    a = get_a(lambda_, rho, c)\n",
    "    tau_c = get_tau_c(l_c, lambda_, a, h)\n",
    "    tau = -tau_c * np.log(theta_m_to_theta_0)\n",
    "    print(f'所需时间为：{tau:.0f} s')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-15"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "导线的直径应限制在0.67 mm以下\n",
      "前面假设的集中参数法适用\n"
     ]
    }
   ],
   "source": [
    "t = 500\n",
    "lambda_ = 210\n",
    "rho = 7200\n",
    "c = 420\n",
    "t_0 = 25\n",
    "t_oo = 650\n",
    "tau = 1*60\n",
    "h = 12\n",
    "\n",
    "# 先假设满足集中参数法，后续再验证Bi数满足条件\n",
    "theta_m_to_theta_0 = (t - t_oo) / (t_0 - t_oo)\n",
    "tau_c = -tau / np.log(theta_m_to_theta_0)\n",
    "d = 4 * h *tau_c / (rho * c)\n",
    "print(f'导线的直径应限制在{d*1000:.2f} mm以下')\n",
    "Bi = h * d / (4*lambda_)\n",
    "if Bi < 0.1:\n",
    "    print(f'前面假设的集中参数法适用')\n",
    "else:\n",
    "    print(f'前面假设的集中参数法不适用')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-16"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1) h = 3450 W/m^2-K\n",
      "(2) h = 7621 W/m^2-K\n"
     ]
    }
   ],
   "source": [
    "d = 20e-3\n",
    "shape = 'S'\n",
    "t_0 = 650\n",
    "t_oo = 20\n",
    "t_m = 450\n",
    "dt_dtau_list = np.array([180, 360])\n",
    "rho = 10500\n",
    "c = 262\n",
    "lambda_ = 360\n",
    "\n",
    "a = get_a(lambda_, rho, c)\n",
    "tau_list = abs(t_m - t_0) / dt_dtau_list\n",
    "l_c = d/2   # 后续用到的公式都是基于半径r为特征长度的公式\n",
    "eta = 0\n",
    "\n",
    "for i, tau in enumerate(tau_list):\n",
    "    def expressions(p):\n",
    "        h = p[0]\n",
    "        Bi = get_Bi(l_c, lambda_, h)\n",
    "        mu = get_mu(Bi, shape)\n",
    "        Fo = get_Fo(tau, l_c, a)\n",
    "        xpr = (t_m - t_oo)/(t_0 - t_oo) - theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "        return xpr\n",
    "\n",
    "\n",
    "    guess_values = 3000\n",
    "    h = root(expressions, guess_values).x[0]\n",
    "    print(f'({i+1}) h = {h:.0f} W/m^2-K')\n",
    "\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-17"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "可以使用集中参数法\n",
      "加热到其熔点所需的时间为：1.225e-03 s\n",
      "从刚到达熔点直至全部熔为液滴所需的时间为：1.548e-03 s\n"
     ]
    }
   ],
   "source": [
    "shape = 'C'\n",
    "T_oo = 1e4\n",
    "D_p = 50e-6\n",
    "rho = 3970\n",
    "lambda_ = 11\n",
    "c = 1560\n",
    "h = 10000\n",
    "T_melt = 2350\n",
    "gamma = 3580e3\n",
    "\n",
    "T_0 = 300\n",
    "\n",
    "l_c = D_p / 2\n",
    "theta_m_to_0 = (T_melt - T_oo) / (T_0 - T_oo)\n",
    "eta = 0\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "if Bi < 1/30:\n",
    "    print(f'可以使用集中参数法')\n",
    "    tau = - rho * c * D_p / (6 * h) * np.log(theta_m_to_0)\n",
    "    print(f'加热到其熔点所需的时间为：{tau:.3e} s')\n",
    "# 也可以不用集中参数法，利用下面代码直接计算：\n",
    "# mu_v = mu(Bi_v, shape)\n",
    "# guess_value = 1\n",
    "# Fo_v = root(lambda Fo_v: theta_m_to_0 - theta_to_theta_0_ratio(mu_v, eta, Fo_v, shape), guess_value).x[0]\n",
    "# guess_value2 = 1\n",
    "# a_v = a(lambda_, rho, c)\n",
    "# tau = root(lambda tau_v: Fo_v - Fo(tau_v, l_c, a_v), guess_value2).x[0]\n",
    "# print(f'加热到其熔点所需的时间为：{tau:.3e} s')\n",
    "\n",
    "V = 4/3 * np.pi * (D_p/2)**3\n",
    "m = rho * V\n",
    "Q = m * gamma\n",
    "Delta_T = T_oo - T_melt\n",
    "A = 4 * np.pi * (D_p/2)**2\n",
    "Delta_tau = Q / (h * A * Delta_T)\n",
    "print(f'从刚到达熔点直至全部熔为液滴所需的时间为：{Delta_tau:.3e} s')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "id": "35728adb",
   "metadata": {
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "## 习题03-18"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "t = 108.34 C\n"
     ]
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEGCAYAAACKB4k+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAZRklEQVR4nO3deXCcd53n8fdXh2VbsqP4iB1y2SHkICSEyITAECemQoAJ5zJA7RZHsgtZwrBVMAxkGGaY3VlmKzDLFMyyVSyQCccua1IDu1yZsAPIToAkxGYMJDG5TBzHjmNbtiy3JOv87R/9qC07sqOW1Ho6et6vqi493a3u/tRj6/n07zkjpYQkSQANeQeQJNUPS0GSVGEpSJIqLAVJUoWlIEmqaMo7wHQsW7YsrVq1akqv7e3tpbW1dWYDzQBzVcdc1avXbOaqznRybd68eV9KafmET6aUnrO3jo6ONFWdnZ1Tfm0tmas65qpevWYzV3WmkwvYlI6zXHX1kSSpwlKQJFVYCpKkCktBklRhKUiSKiwFSVKFpSBJqnhOH7ym6qSUGBwZpXdghN6BYQaGRxkaOXIbHC4/P5Q9PjgyymhKjI7Cg08Osee+HeX7CUazfZrHpkcT2f3xz0+c4ZmPHXN/wuwTPEbi8ccH2TL88LP83iTfcAY9vn2QXw0+VNPPmKp6zWau6rT3j3BVDd7XUniOGxwe5ckDfTyxv4+d3f10lQbZVxqgqzTI3tIA3X2D9A6MUBoYpndgmOHRaSwM7//NzAWfSY8+MqWXRcxwjvESsO3RGn7ANNRrNnNV5V0XzKvJ+1oKzyG7Dx5my44DPLCrhwd29fDQ7kPsOtj/jC+9Jy1oZmnbPJa1tbB6WSttLc20tTTS2tJEa0sTbS1NLJzXSEtzI/Mag+bGhsptXlMD8xobaG4KmhoaaGoIGiK49957eMUrXk5DQEMEkf0s3yCyn2OP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6QgTUNKqSel9BLgeuCfU0qXpJQuTymNUj6VykPZxZx+kV245Yx8E0snZilIM+NFlM+LA0BENAMLKZ/k7R7gSsrnHFqSSzppkiwFaWa8kPKZK8dcAfyM8kneuihfCOVDHH0tCKnuWArSzHge5bO0jnk98APKl3f8ZUrp1cBtwEdyyCZNmhuapZnxI+CWiLgupbQRODel9HBEjAC3RsQngBbKowWpbnnqbElShauPJEkVloIkqcJSkCRVWAqSpApLQZJUYSlIkiosBUlSxf8HrwY4zsm5rzkAAAAASUVORK5CYII=\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "温度升高到107.34°C所需的时间为6.0 s\n"
     ]
    }
   ],
   "source": [
    "d = 1e-3\n",
    "t_oo = 25\n",
    "R_l = 0.01\n",
    "I = 120\n",
    "h = 550\n",
    "Delta_t = 1\n",
    "\n",
    "c = 500\n",
    "rho = 8000\n",
    "lambda_ = 25\n",
    "\n",
    "guess_values = t_oo + 1\n",
    "t_balance = root(lambda t: h * np.pi * d * (t - t_oo) - I**2 * R_l, guess_values).x[0]\n",
    "print(f't = {t_balance:.2f} C')\n",
    "\n",
    "\n",
    "# dt_dtau = \\dfrac{I^2 R_l - \\pi h d (t - t_oo)}{\\pi c \\rho d^2 / 4}\n",
    "def derivative(x, t):\n",
    "    return np.vstack((t[1], -(I**2 * R_l - h * np.pi * d * (t[0] - t_oo)) / (np.pi * c * rho * d**2 / 4)))\n",
    "\n",
    "\n",
    "# 定义边界条件，t(0) = t_oo, t(np.inf) = t\n",
    "# 边界条件函数的t_a和t_b参数为边界条件的起始和终止点\n",
    "def bc(t_a, t_b):\n",
    "    return np.array([t_a[0] - t_oo, t_b[1]])\n",
    "\n",
    "\n",
    "N = 1000\n",
    "tau_oo = 40\n",
    "tau = np.linspace(0, tau_oo, N)\n",
    "t = np.zeros((2, tau.size))\n",
    "t[0, 0] = t_oo\n",
    "result = solve_bvp(derivative, bc, tau, t)\n",
    "\n",
    "x_plot = np.linspace(0, tau_oo, N)\n",
    "t_plot = result.sol(x_plot)[0]\n",
    "plt.plot(x_plot, t_plot)\n",
    "plt.grid()\n",
    "plt.xlabel(r'$\\tau$/s')\n",
    "plt.ylabel('$t$/°C')\n",
    "plt.show()\n",
    "\n",
    "t_search = t_balance - Delta_t\n",
    "arg = find_nearest(t_plot, t_search)\n",
    "print(f'温度升高到{t_search:.2f}°C所需的时间为{x_plot[arg]:.1f} s')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-23"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "t = 46.87 C\n"
     ]
    }
   ],
   "source": [
    "l_1 = 10e-2\n",
    "l_2 = 5e-2\n",
    "t_0 = 20\n",
    "t_oo = 200\n",
    "h = 125\n",
    "tau = 6*60\n",
    "rho = 7820\n",
    "c = 460\n",
    "lambda_ = 15.2\n",
    "\n",
    "# 其他面绝热，因此可将问题简化为厚度为2*l_2的对称无限大平板处理\n",
    "l_c = l_2\n",
    "x = 0\n",
    "shape = 'P'\n",
    "\n",
    "a = get_a(lambda_, rho, c)\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "eta = x / l_c\n",
    "ratio_m_to_0 = theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "t = t_oo + ratio_m_to_0 * (t_0 - t_oo)\n",
    "print(f't = {t:.2f} C')\n",
    "\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-24"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "圆桂体中心过余温度下降到初值一半所需要的时间为12736 s\n"
     ]
    }
   ],
   "source": [
    "H = 0.4\n",
    "h = 50\n",
    "lambda_ = 20\n",
    "a = 5.6e-6\n",
    "\n",
    "# 由于圆柱侧面绝热，该问题可以等效为无限大平板，l_c = H/2\n",
    "shape = 'P'\n",
    "l_c = H/2\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "eta = 0\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    xpr = theta_to_theta_0_ratio(mu, eta, Fo, shape) - 0.5\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = 1\n",
    "tau = root(expressions, guess_values).x[0]\n",
    "print(f'圆桂体中心过余温度下降到初值一半所需要的时间为{tau:.0f} s')\n",
    "\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-25"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "表面温度为 508.47 C\n",
      "内侧温度为 776.73 C\n"
     ]
    }
   ],
   "source": [
    "t_0 = 1000\n",
    "t_oo = 5\n",
    "h = 1135\n",
    "tau = 5*60\n",
    "delta = 50e-3\n",
    "lambda_ = 56.8\n",
    "a = 4.13e-6\n",
    "\n",
    "# 由于内侧面绝热，该问题可以等效为无限大平板，l_c = delta\n",
    "l_c = delta\n",
    "shape = 'P'\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "t_delta = t_oo + (t_0 - t_oo) * theta_to_theta_0_ratio(mu, 1, Fo, shape)\n",
    "t_m = t_oo + (t_0 - t_oo) * theta_to_theta_0_ratio(mu, 0, Fo, shape)\n",
    "print(f'表面温度为 {t_delta:.2f} C')\n",
    "print(f'内侧温度为 {t_m:.2f} C')\n",
    "\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-26"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 1318 s\n",
      "tau_1 = 2658 s\n"
     ]
    }
   ],
   "source": [
    "delta = 8e-3\n",
    "t_0 = -15\n",
    "t_oo = 25\n",
    "h = 4.4\n",
    "t_m = 10\n",
    "lambda_ = 1.1\n",
    "a = 7.5e-7\n",
    "\n",
    "# 该问题可以等效为无限大平板，l_c = delta/2\n",
    "l_c = delta/2\n",
    "shape = 'P'\n",
    "\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "eta = 0\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p[0]\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    xpr = (t_m - t_oo) / (t_0 - t_oo) - theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = 1\n",
    "tau = root(expressions, guess_values, method='lm').x[0]\n",
    "print(f'tau = {tau:.0f} s')\n",
    "\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "check_Fo(Fo)\n",
    "\n",
    "l_c_1 = delta\n",
    "\n",
    "Bi_1 = get_Bi(l_c_1, lambda_, h)\n",
    "mu_1 = get_mu(Bi_1, shape)\n",
    "eta_1 = 0\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p[0]\n",
    "    Fo_1 = get_Fo(tau, l_c_1, a)\n",
    "    xpr = (t_m - t_oo) / (t_0 - t_oo) - theta_to_theta_0_ratio(mu_1, eta_1, Fo_1, shape)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = 1\n",
    "tau_1 = root(expressions, guess_values, method='lm').x[0]\n",
    "print(f'tau_1 = {tau_1:.0f} s')\n",
    "\n",
    "Fo_1 = get_Fo(tau, l_c_1, a)\n",
    "check_Fo(Fo_1)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-28"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 58148 s\n",
      "此时钢板两表面的温差为14 C\n"
     ]
    }
   ],
   "source": [
    "delta = 300e-3\n",
    "t_0 = 20\n",
    "t_oo = 1200\n",
    "a = 5.55e-6\n",
    "h = 290\n",
    "Delta_t = 15\n",
    "lambda_ = 49.8\n",
    "shape = 'P'\n",
    "\n",
    "t_surface = t_oo - Delta_t\n",
    "\n",
    "l_c = delta\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    xpr = t_surface - t_oo - (t_0 - t_oo) * theta_to_theta_0_ratio(mu, 1, Fo, shape)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_value = [1]\n",
    "tau = root(expressions, guess_value).x[0]\n",
    "print(f'tau = {tau:.0f} s')\n",
    "\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "t_m = t_oo + (t_0 - t_oo) * theta_to_theta_0_ratio(mu, 0, Fo, shape)\n",
    "Delta_t_tau = t_surface - t_m\n",
    "print(f'此时钢板两表面的温差为{Delta_t_tau:.0f} C')\n",
    "\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-29"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "取一项的结果为：theta_ratio = 0.341508\n",
      "取四项的结果为：theta_ratio = 0.341505\n",
      "t_m = 70.98 C\n"
     ]
    }
   ],
   "source": [
    "delta = 3e-2/2\n",
    "t_0 = 150\n",
    "t_w = 30\n",
    "a = 2e-6\n",
    "\n",
    "\n",
    "def theta_ratio(delta, x, tau, number_to_calculate):\n",
    "    sum = 0\n",
    "    for n in range(1, number_to_calculate+1):\n",
    "        # 课本上的公式有误\n",
    "        sum += 1/n * np.exp(-(n*np.pi/(2*delta))**2 * a*tau) * np.sin(n * np.pi * x / (2*delta))\n",
    "    return 4/np.pi * sum\n",
    "\n",
    "\n",
    "tau = 1*60\n",
    "\n",
    "result1 = theta_ratio(delta, delta, tau, 1)\n",
    "print(f'取一项的结果为：theta_ratio = {result1:.6f}')\n",
    "result2 = theta_ratio(delta, delta, tau, 4)\n",
    "print(f'取四项的结果为：theta_ratio = {result2:.6f}')\n",
    "t_m = t_w + result1 * (t_0 - t_w)\n",
    "print(f't_m = {t_m:.2f} C')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-30"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 14 s\n"
     ]
    }
   ],
   "source": [
    "T_oo = 2300\n",
    "T_m = 1500\n",
    "delta = 10e-3\n",
    "lambda_ = 10\n",
    "a = 6e-6\n",
    "h = 2500\n",
    "T_0 = 300\n",
    "\n",
    "# 保守估计时，认为陶瓷和喷管之间绝热\n",
    "# 此时可将陶瓷层看做无限大平板处理\n",
    "l_c = delta\n",
    "shape = 'P'\n",
    "\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    xpr = T_m - T_oo - (T_0 - T_oo) * theta_to_theta_0_ratio(mu, 0, Fo, shape)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_value = 1\n",
    "tau = root(expressions, guess_value).x[0]\n",
    "print(f'tau = {tau:.0f} s')\n",
    "\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-31"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1) tau = 16 s\n",
      "(2) Delta_t = 281.06 C\n",
      "(3) 平均温度梯度为 31228.34 C/m, 最大温度梯度为 59451.22 C/m\n"
     ]
    }
   ],
   "source": [
    "delta = 9e-3\n",
    "t_0 = 30\n",
    "h = 1950\n",
    "rho = 8400\n",
    "c = 560\n",
    "lambda_ = 24.6\n",
    "t_oo = 1750\n",
    "t_w = 1000\n",
    "\n",
    "l_c = delta\n",
    "shape = 'P'\n",
    "\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "a = get_a(lambda_, rho, c)\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    xpr = t_w - t_oo - (t_0 - t_oo) * theta_to_theta_0_ratio(mu, 1, Fo, shape)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_value = [1]\n",
    "tau = root(expressions, guess_value).x[0]\n",
    "print(f'(1) tau = {tau:.0f} s')\n",
    "\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "t_m = t_oo + (t_0 - t_oo) * theta_to_theta_0_ratio(mu, 0, Fo, shape)\n",
    "Delta_t = t_w - t_m\n",
    "print(f'(2) Delta_t = {Delta_t:.2f} C')\n",
    "\n",
    "average = Delta_t / delta\n",
    "# 由于在壁面处热流密度最大，所以壁面处温度梯度最大\n",
    "# q = lambda_ * partial_t / partial_x = h * (t_oo - t_0)\n",
    "max_gradient = h * (t_oo - t_w) / lambda_\n",
    "print(f'(3) 平均温度梯度为 {average:.2f} C/m, 最大温度梯度为 {max_gradient:.2f} C/m')\n",
    "\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-32"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "dPhi_dr = 225147 W/m\n",
      "方向由圆柱的中心指向外侧\n"
     ]
    }
   ],
   "source": [
    "r = 2e-2\n",
    "dt_dtau = -0.5\n",
    "lambda_ = 43\n",
    "a = 1.2e-5\n",
    "\n",
    "dPhi_dr = - 2 * np.pi * lambda_ * r / a * dt_dtau\n",
    "print(f'dPhi_dr = {dPhi_dr:.0f} W/m')\n",
    "if dPhi_dr > 0:\n",
    "    print('方向由圆柱的中心指向外侧')\n",
    "else:\n",
    "    print('方向由圆柱的外侧指向中心')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-33"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "h = 430.79 W/m^2-K\n"
     ]
    }
   ],
   "source": [
    "d = 20e-2\n",
    "t_0 = 20\n",
    "t_oo = 100\n",
    "tau = 10*60\n",
    "t_m = 80\n",
    "rho = 8440\n",
    "c = 377\n",
    "lambda_ = 109\n",
    "\n",
    "shape = 'C'\n",
    "l_c = d/2\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    h = p[0]\n",
    "    Bi = get_Bi(l_c, lambda_, h)\n",
    "    mu = get_mu(Bi, shape)\n",
    "    eta = 0\n",
    "    a = get_a(lambda_, rho, c)\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    xpr = t_m - t_oo - (t_0 - t_oo) * theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = 1\n",
    "h = root(expressions, guess_values).x[0]\n",
    "print(f'h = {h:.2f} W/m^2-K')\n",
    "\n",
    "a = get_a(lambda_, rho, c)\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-34"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 4669 s\n"
     ]
    }
   ],
   "source": [
    "d = 170e-3\n",
    "t_0 = 17\n",
    "t_oo = 850\n",
    "lambda_ = 30\n",
    "a = 6.2e-6\n",
    "h = 141\n",
    "\n",
    "t_m = 800\n",
    "\n",
    "shape = 'C'\n",
    "l_c = d/2\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p[0]\n",
    "    Bi = get_Bi(l_c, lambda_, h)\n",
    "    mu = get_mu(Bi, shape)\n",
    "    eta = 0\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    xpr = t_m - t_oo - (t_0 - t_oo) * theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = 1\n",
    "tau = root(expressions, guess_values).x[0]\n",
    "print(f'tau = {tau:.0f} s')\n",
    "\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-35"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 3763 s\n"
     ]
    }
   ],
   "source": [
    "d = 40e-2\n",
    "t_0 = 600\n",
    "t_oo = 30\n",
    "t_surface = 450\n",
    "h = 18.5\n",
    "lambda_ = 22.3\n",
    "a = 8.8e-6\n",
    "\n",
    "shape = 'C'\n",
    "l_c = d/2\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p[0]\n",
    "    Bi = get_Bi(l_c, lambda_, h)\n",
    "    mu = get_mu(Bi, shape)\n",
    "    eta = 1\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    xpr = t_surface - t_oo - (t_0 - t_oo) * theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = 1\n",
    "tau = root(expressions, guess_values).x[0]\n",
    "print(f'tau = {tau:.0f} s')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-36"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2小时后: t_s = 1219.96 C, t_m = 1004.92 C\n",
      "3小时后: t_s = 1316.43 C, t_m = 1216.61 C\n",
      "4小时后: t_s = 1361.21 C, t_m = 1314.87 C\n",
      "5小时后: t_s = 1381.99 C, t_m = 1360.49 C\n"
     ]
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEJCAYAAACKWmBmAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAyXklEQVR4nO3deXxU1fnH8c8TskESErKwr2FHQNCgCAhKUVyq+Cu2LrhRK2pb7WL90Wpbq920v2prbW2LtVZprUvBHbVugCCIAVGQNcgWIJCEhOzrPL8/zo3ECCFoZu5k8rxfr3ll7skd8lwG5ptzz73niKpijDHGHE2U3wUYY4wJbxYUxhhjmmVBYYwxplkWFMYYY5plQWGMMaZZFhTGGGOaFZKgEJHJIrK0Sdt5IrKi0fbZIrJCRJaLyPVem4jI/SKyVETeEpHBoajXGGPMYdHB/gEiMheYBVQ0aksEfgHUeNvRwP3AJKAEWCUizwAnA+mqOllEJgC/BWYEu2ZjjDGHBT0ogBxgJjC/UdsvgT8B13nbA4FcVS0EEJElwHjgNGARgKq+IyKjW/ID09PTtX///q1SvDHGtBerV68uUNWMpu1BDwpVXSAi/Ru2RWQ80Bl4g8NBkQ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N8z3PniZd7+d/r9/jV9D4/WFgnvYaPa/uvV9hyQ0tbfwybHdxYuDN8CXgS6h+r47M5sY4wxzbJTT8YYY5plQWGMMaZZFhTGGGOaZUFhjDGmWRYUxhhjmmVBYYwxplkWFMYYY5plQWFMCIlIuog84ncdxhyPaL8LMCbSiEhn3N3MscAA3IyeVbjpus/DzdppTJthPQpjWpmqlqjqWGA28JqqjlHV8eom1Tsb2OwtPvOOtxBNH38rNqZ5FhTGBM9I4KOGDW8G1064SfVWAlOAH+MWnzEmbFlQGBM8I3ALWTU4HTch299wMw0vAr7Lp9ccMCbsWFAYEzw9OTwFPcCXcbN+zgBWqepZuJl4b/GhNmNazAazjQmeV4GHReQaVW2YqnuLiNQDj4jI7UAcrldhTNiyacaNMcY0y049GWOMaZYFhTHGmGZZUBhjjGmWBYUxxphmWVAYY4xplgWFMcaYZllQGGOMadb/A/9vA6JHASSNAAAAAElFTkSuQmCC\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": "<map at 0x7f92a90b2a58>"
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "t_0 = 30\n",
    "t_oo = 1400\n",
    "d = 600e-3\n",
    "tau_list = np.arange(2, 6) * 3600\n",
    "lambda_ = 43.5\n",
    "a = 7.5e-6\n",
    "h = 290\n",
    "\n",
    "shape = 'C'\n",
    "l_c = d/2\n",
    "t_s_list = np.zeros(len(tau_list))\n",
    "t_m_list = np.zeros(len(tau_list))\n",
    "for i, tau in enumerate(tau_list):\n",
    "    Bi = get_Bi(l_c, lambda_, h)\n",
    "    mu = get_mu(Bi, shape)\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    t_s = t_oo + (t_0 - t_oo) * theta_to_theta_0_ratio(mu, 1, Fo, shape)\n",
    "    t_s_list[i] = t_s\n",
    "    t_m = t_oo + (t_0 - t_oo) * theta_to_theta_0_ratio(mu, 0, Fo, shape)\n",
    "    t_m_list[i] = t_m\n",
    "    print(f'{int(tau/3600)}小时后: t_s = {t_s:.2f} C, t_m = {t_m:.2f} C')\n",
    "\n",
    "tau = np.linspace(2*3600, 5*3600, 100000)\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "t_s = t_oo + (t_0 - t_oo) * theta_to_theta_0_ratio(mu, 1, Fo, shape)\n",
    "t_m = t_oo + (t_0 - t_oo) * theta_to_theta_0_ratio(mu, 0, Fo, shape)\n",
    "\n",
    "fig, ax = plt.subplots()\n",
    "ax.plot(tau, t_s, label='$t_s$')\n",
    "ax.plot(tau, t_m, label='$t_m$')\n",
    "ax.set_xlabel(r'$\\tau$/s')\n",
    "ax.set_ylabel('$t$/°C')\n",
    "plt.legend()\n",
    "plt.show()\n",
    "\n",
    "map(check_Fo, Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-37"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "t_m = 1114.28 C\n"
     ]
    }
   ],
   "source": [
    "d = 500e-3\n",
    "height = 800e-3\n",
    "t_0 = 30\n",
    "t_oo = 1200\n",
    "h = 180\n",
    "lambda_ = 40\n",
    "a = 8e-6\n",
    "tau = 3*3600\n",
    "x = 400e-3\n",
    "r = 0.13\n",
    "shape = ['P', 'C']\n",
    "\n",
    "# 先考虑厚度方向，作为无限大平板进行分析\n",
    "l_c_1 = height / 2\n",
    "Bi_1 = h * l_c_1 / lambda_\n",
    "Fo_1 = get_Fo(tau, l_c_1, a)\n",
    "mu_1 = get_mu(Bi_1, shape[0])\n",
    "eta_1 = 0\n",
    "ratio_m_to_0_1 = theta_to_theta_0_ratio(mu_1, eta_1, Fo_1, shape[0])\n",
    "check_Fo(Fo_1)\n",
    "\n",
    "# 再考虑径向，作为无限长圆柱进行分析\n",
    "l_c_2 = d / 2\n",
    "Bi_2 = get_Bi(l_c_2, lambda_, h)\n",
    "Fo_2 = get_Fo(tau, l_c_2, a)\n",
    "mu_2 = get_mu(Bi_2, shape[1])\n",
    "eta_2 = 0\n",
    "ratio_m_to_0_2 = theta_to_theta_0_ratio(mu_2, eta_2, Fo_2, shape[1])\n",
    "check_Fo(Fo_2)\n",
    "\n",
    "ratio_m_to_0 = ratio_m_to_0_1 * ratio_m_to_0_2\n",
    "t_m = t_oo + ratio_m_to_0 * (t_0 - t_oo)\n",
    "print(f't_m = {t_m:.2f} C')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-38"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "t_0 = 216.33 C\n"
     ]
    }
   ],
   "source": [
    "d = 30e-3\n",
    "lambda_ = 0.3\n",
    "rhoc = 1050e3\n",
    "t = 200\n",
    "tau = 3*60\n",
    "t_oo = 150\n",
    "h = 8.5\n",
    "shape = 'C'\n",
    "\n",
    "l_c = d/2\n",
    "\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "a = lambda_ / rhoc\n",
    "mu = get_mu(Bi, shape)\n",
    "eta = 1\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "ratio_m_to_0 = theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "t_0 = t_oo + (t - t_oo) / ratio_m_to_0\n",
    "print(f't_0 = {t_0:.2f} C')\n",
    "\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-39"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 215 s\n"
     ]
    }
   ],
   "source": [
    "d = 25e-3\n",
    "shape = 'C'\n",
    "R_l = 0.10\n",
    "T_0 = 800\n",
    "T_oo = 300\n",
    "h = 120\n",
    "T_m = 500\n",
    "rho = 2600\n",
    "c = 808\n",
    "lambda_ = 3.98\n",
    "\n",
    "l_c = d/2\n",
    "\n",
    "h_p = 1 / (1/h + R_l*np.pi*d)\n",
    "Bi = get_Bi(l_c, lambda_, h_p)\n",
    "a = get_a(lambda_, rho, c)\n",
    "mu = get_mu(Bi, shape)\n",
    "eta = 0\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    ratio_m_to_0 = theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "    xpr = ratio_m_to_0 - (T_m - T_oo) / (T_0 - T_oo)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = np.ones(1)\n",
    "tau = root(expressions, guess_values).x[0]\n",
    "print(f'tau = {tau:.0f} s')\n",
    "\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-40"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "t = 95.85 C\n"
     ]
    }
   ],
   "source": [
    "shape = 'S'\n",
    "t_oo = 250\n",
    "d = 5e-2\n",
    "t_0 = 20\n",
    "\n",
    "t_a = 50\n",
    "material = 'water'\n",
    "\n",
    "tau = 20*60\n",
    "h = 20\n",
    "\n",
    "T_a = sc.convert_temperature(t_a, 'C', 'K')\n",
    "P_a = sc.atm\n",
    "rho = psi('D', 'T', T_a, 'P', P_a, material)\n",
    "c = psi('C', 'T', T_a, 'P', P_a, material)\n",
    "lambda_ = psi('L', 'T', T_a, 'P', P_a, material)\n",
    "\n",
    "l_c = d/2\n",
    "\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "a = get_a(lambda_, rho, c)\n",
    "mu = get_mu(Bi, shape)\n",
    "eta = 0\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "ratio_s_to_0 = theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "t = t_oo + (t_0 - t_oo) * ratio_s_to_0\n",
    "\n",
    "print(f't = {t:.2f} C')\n",
    "\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-41"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 191 s\n",
      "T_s = 135.53 C\n"
     ]
    }
   ],
   "source": [
    "shape = 'S'\n",
    "d = 10e-2\n",
    "t_0 = 250\n",
    "t_oo = 10\n",
    "h = 200\n",
    "t_m = 150\n",
    "lambda_ = 44.8\n",
    "a = 1.229e-5\n",
    "\n",
    "l_c = d/2\n",
    "\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "eta = 0\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    ratio_m_to_0 = theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "    xpr = t_m - t_oo - (t_0 - t_oo) * ratio_m_to_0\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = np.ones(1)\n",
    "tau = root(expressions, guess_values).x[0]\n",
    "print(f'tau = {tau:.0f} s')\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "ratio_s_to_0 = theta_to_theta_0_ratio(mu, 1, Fo, shape)\n",
    "t_s = t_oo + (t_0 - t_oo) * ratio_s_to_0\n",
    "print(f'T_s = {t_s:.2f} C')\n",
    "\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-42"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 3.4 s\n"
     ]
    }
   ],
   "source": [
    "shape = 'S'\n",
    "T_x = 1000\n",
    "T_oo = 1300\n",
    "h = 5000\n",
    "d = 20e-3\n",
    "T_0 = 300\n",
    "delta = 1e-3\n",
    "x = d/2 - delta\n",
    "rho = 7800\n",
    "c = 500\n",
    "lambda_ = 50\n",
    "\n",
    "l_c = d/2\n",
    "\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "a = get_a(lambda_, rho, c)\n",
    "eta = x / l_c\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    ratio_x_to_0 = theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "    xpr = T_x - T_oo - (T_0 - T_oo) * ratio_x_to_0\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = np.ones(1)\n",
    "tau = root(expressions, guess_values).x[0]\n",
    "print(f'tau = {tau:.1f} s')\n",
    "\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-43"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "t_s = 369 s\n"
     ]
    }
   ],
   "source": [
    "shape = 'S'\n",
    "r = 0.15\n",
    "t_0 = 30\n",
    "lambda_ = 0.8\n",
    "c = 840\n",
    "rho = 2750\n",
    "t_oo = 410\n",
    "h = 10.5\n",
    "tau = 8*3600\n",
    "\n",
    "l_c = r\n",
    "\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "a = get_a(lambda_, rho, c)\n",
    "eta = 1\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "ratio_s_to_0 = theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "t_s = t_oo + (t_0 - t_oo) * ratio_s_to_0\n",
    "print(f't_s = {t_s:.0f} C')\n",
    "\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-44"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 6613 s\n"
     ]
    }
   ],
   "source": [
    "t_0 = 10\n",
    "t_oo = -5\n",
    "shape = 'S'\n",
    "d = 6e-2\n",
    "t_a = 5\n",
    "material = 'Water'\n",
    "h = 7\n",
    "tau = 8*3600\n",
    "t_s = 0\n",
    "\n",
    "l_c = d/2\n",
    "\n",
    "T_a = sc.convert_temperature(t_a, 'C', 'K')\n",
    "P_a = sc.atm\n",
    "rho = psi('D', 'T', T_a, 'P', P_a, material)\n",
    "c = psi('C', 'T', T_a, 'P', P_a, material)\n",
    "lambda_ = psi('L', 'T', T_a, 'P', P_a, material)\n",
    "\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "a = get_a(lambda_, rho, c)\n",
    "eta = 1\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    ratio_s_to_0 = theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "    xpr = t_s - t_oo - (t_0 - t_oo) * ratio_s_to_0\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = np.ones(1)\n",
    "tau = root(expressions, guess_values).x[0]\n",
    "print(f'tau = {tau:.0f} s')\n",
    "\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-45"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "半小时后，卵石的中心温度为:66.06 C，卵石的储热量为：21738917 J\n",
      "两小时后，卵石的中心温度为:79.90 C，卵石的储热量为：26745581 J\n"
     ]
    },
    {
     "data": {
      "text/plain": "<map at 0x7f92a8d154e0>"
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "shape = 'S'\n",
    "d = 10e-2\n",
    "t_0 = 20\n",
    "t_oo = 80\n",
    "tau = np.array([0.5, 2]) * 3600\n",
    "h = 35\n",
    "lambda_ = 2.2\n",
    "a = 1.13e-6\n",
    "c = 780\n",
    "rho = 2643  # 缺少条件，这里取花岗石的密度\n",
    "\n",
    "l_c = d/2\n",
    "\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "eta = 0\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "ratio_m_to_0 = theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "t_m = t_oo + (t_0 - t_oo) * ratio_m_to_0\n",
    "ratio_Q_m_to_0 = Q_to_Q_0_ratio(mu, Fo, shape)\n",
    "V = 4/3 * (d/2)**3\n",
    "\n",
    "# 如果卵石按照正六面体顶点及其中心布置的方式堆放，则每层卵石的数量相等，相邻两层卵石的高度差相等\n",
    "distance1 = 2*d/np.sqrt(3)  # 同层两相邻卵石之间的距离\n",
    "distance = distance1/2  # 相邻两层卵石中心平面之间的距离\n",
    "# 单位高度的层数\n",
    "layer_number = 1 / distance\n",
    "# 每层单位面积的卵石数量\n",
    "n_layer = (1/distance1)**2\n",
    "# 单位体积的卵石数量为\n",
    "n = layer_number * n_layer\n",
    "V_n = n * V\n",
    "\n",
    "Q_0 = rho * c * V_n * abs(t_0 - t_oo)\n",
    "Q = ratio_Q_m_to_0 * Q_0\n",
    "\n",
    "print(f'半小时后，卵石的中心温度为:{t_m[0]:.2f} C，卵石的储热量为：{Q[0]:.0f} J')\n",
    "print(f'两小时后，卵石的中心温度为:{t_m[1]:.2f} C，卵石的储热量为：{Q[1]:.0f} J')\n",
    "\n",
    "map(check_Fo, Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-46"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "A球表面冷却到415 K所需的时间为4091 s\n",
      "B球表面冷却到415 K所需的时间为41 s\n",
      "A球中心冷却到415 K所需的时间为4097 s\n",
      "B球中心冷却到415 K所需的时间为47 s\n"
     ]
    }
   ],
   "source": [
    "shape = 'S'\n",
    "T_0 = 600\n",
    "T_oo = 300\n",
    "d_A = 200e-3\n",
    "d_B = 20e-3\n",
    "rho_A = 1600\n",
    "rho_B = 400\n",
    "c_A = 0.4e3\n",
    "c_B = 1.6e3\n",
    "lambda_A = 170\n",
    "lambda_B = 1.7\n",
    "h_A = 5\n",
    "h_B = 50\n",
    "T = 415\n",
    "\n",
    "l_c_A = d_A / 2\n",
    "l_c_B = d_B / 2\n",
    "\n",
    "Bi_A = get_Bi(l_c_A, lambda_A, h_A)\n",
    "Bi_B = get_Bi(l_c_B, lambda_B, h_B)\n",
    "mu_A = get_mu(Bi_A, shape)\n",
    "mu_B = get_mu(Bi_B, shape)\n",
    "a_A = get_a(lambda_A, rho_A, c_A)\n",
    "a_B = get_a(lambda_B, rho_B, c_B)\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau_As, tau_Bs, tau_Am, tau_Bm = p\n",
    "    Fo_As = get_Fo(tau_As, l_c_A, a_A)\n",
    "    Fo_Bs = get_Fo(tau_Bs, l_c_B, a_B)\n",
    "    Fo_Am = get_Fo(tau_Am, l_c_A, a_A)\n",
    "    Fo_Bm = get_Fo(tau_Bm, l_c_B, a_B)\n",
    "    ratio_As_to_0 = theta_to_theta_0_ratio(mu_A, 1, Fo_As, shape)\n",
    "    xpr1 = T - T_oo - (T_0 - T_oo) * ratio_As_to_0\n",
    "    ratio_Bs_to_0 = theta_to_theta_0_ratio(mu_B, 1, Fo_Bs, shape)\n",
    "    xpr2 = T - T_oo - (T_0 - T_oo) * ratio_Bs_to_0\n",
    "    ratio_Am_to_0 = theta_to_theta_0_ratio(mu_A, 0, Fo_Am, shape)\n",
    "    xpr3 = T - T_oo - (T_0 - T_oo) * ratio_Am_to_0\n",
    "    ratio_Bm_to_0 = theta_to_theta_0_ratio(mu_B, 0, Fo_Bm, shape)\n",
    "    xpr4 = T - T_oo - (T_0 - T_oo) * ratio_Bm_to_0\n",
    "    return xpr1, xpr2, xpr3, xpr4\n",
    "\n",
    "\n",
    "guess_values = np.ones(4)\n",
    "tau_As, tau_Bs, tau_Am, tau_Bm = root(expressions, guess_values).x\n",
    "print(f'A球表面冷却到{T} K所需的时间为{tau_As:.0f} s')\n",
    "print(f'B球表面冷却到{T} K所需的时间为{tau_Bs:.0f} s')\n",
    "print(f'A球中心冷却到{T} K所需的时间为{tau_Am:.0f} s')\n",
    "print(f'B球中心冷却到{T} K所需的时间为{tau_Bm:.0f} s')\n",
    "\n",
    "Fo_As = get_Fo(tau_As, l_c_A, a_A)\n",
    "Fo_Bs = get_Fo(tau_Bs, l_c_B, a_B)\n",
    "Fo_Am = get_Fo(tau_Am, l_c_A, a_A)\n",
    "Fo_Bm = get_Fo(tau_Bm, l_c_B, a_B)\n",
    "\n",
    "check_Fo(Fo_As, Fo_Bs, Fo_Am, Fo_Bm)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-47"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 13 s\n",
      "t_m = -0.61 C\n"
     ]
    }
   ],
   "source": [
    "shape = 'S'\n",
    "t_0 = -30\n",
    "d = 5e-3\n",
    "t_oo = 5\n",
    "t_s = 0\n",
    "h = 240\n",
    "c = 2040\n",
    "rho = 921\n",
    "lambda_ = 2.56\n",
    "\n",
    "l_c = d/2\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "a = get_a(lambda_, rho, c)\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    xpr = t_s - t_oo - (t_0 - t_oo) * theta_to_theta_0_ratio(mu, 1, Fo, shape)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_value = np.ones(1)\n",
    "tau = root(expressions, guess_value).x[0]\n",
    "print(f'tau = {tau:.0f} s')\n",
    "\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "t_m = t_oo + (t_0 - t_oo) * theta_to_theta_0_ratio(mu, 0, Fo, shape)\n",
    "print(f't_m = {t_m:.2f} C')\n",
    "\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-48"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "lambda = 1.41 W/m-K$\n"
     ]
    }
   ],
   "source": [
    "t_0 = 30\n",
    "t_w = 100\n",
    "x = 10e-3\n",
    "tau = 2*60\n",
    "t_x = 65\n",
    "rho = 2200\n",
    "c = 700\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    lambda_ = p\n",
    "    a = get_a(lambda_, rho, c)\n",
    "    xpr = t_x - t_x_for_constant_t_w(x, tau, t_0, t_w, a)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_value = np.ones(1)\n",
    "lambda_ = root(expressions, guess_value).x[0]\n",
    "print(f'lambda = {lambda_:.2f} W/m-K')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-49"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "钢制家具感觉更冷一些\n"
     ]
    }
   ],
   "source": [
    "# 人对温度的感知由热流密度决定，比较二者的热流密度即可\n",
    "# 而在接触面两边，人体皮肤中的热流密度等于触摸物中的热流密度\n",
    "# 只需要比较两种情况下触摸物表面热流密度的相对大小即可\n",
    "# 由于短时间内皮肤表面温度不会下降太多，可以把该问题看做半无限大平板第一类边界条件下的热流密度的求解问题\n",
    "t_0 = 20\n",
    "rho_1 = 545\n",
    "lambda_1 = 0.17\n",
    "c_1 = 2385\n",
    "rho_2 = 7820\n",
    "lambda_2 = 18\n",
    "c_2 = 460\n",
    "\n",
    "a_1 = get_a(lambda_1, rho_1, c_1)\n",
    "a_2 = get_a(lambda_2, rho_2, c_2)\n",
    "\n",
    "# # 假定人体皮肤的温度为37.5°C，人体在0.2s后感应出冷热\n",
    "# t_w = 37.5\n",
    "# tau = 0.2\n",
    "#\n",
    "#\n",
    "# q_1 = q_x_for_constant_t_w(0, tau, t_0, t_w, lambda_1, a_1)\n",
    "# q_2 = q_x_for_constant_t_w(0, tau, t_0, t_w, lambda_2, a_2)\n",
    "# ratio = q_1 / q_2\n",
    "\n",
    "# 根据式3-38， 对于x=0，两种情况下触摸物表面热流密度之比ratio为\n",
    "ratio = lambda_1/lambda_2 * np.sqrt(a_2/a_1)\n",
    "if 0 < ratio < 1:\n",
    "    print('钢制家具感觉更冷一些')\n",
    "elif ratio >= 1:\n",
    "    print('木制家具感觉更冷一些')\n",
    "else:\n",
    "    print('计算错误')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-50"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Q = 1395794 J\n",
      "这一假设使计算得到的放热偏高\n"
     ]
    }
   ],
   "source": [
    "t_0 = 50\n",
    "t_w = 20\n",
    "tau = 10*60\n",
    "rho = 2300\n",
    "c = 880\n",
    "lambda_ = 1.4\n",
    "\n",
    "a = get_a(lambda_, rho, c)\n",
    "Q = Q_s_for_constant_t_w(tau, t_0, t_w, lambda_, a)\n",
    "print(f'Q = {-Q:.0f} J')\n",
    "print('这一假设使计算得到的放热偏高')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-51"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "x = 0.945 m\n"
     ]
    }
   ],
   "source": [
    "a = 1.65e-7\n",
    "t_0 = 15\n",
    "t_w = -20\n",
    "tau = 50*24*3600\n",
    "t_x = 0\n",
    "\n",
    "guess_value = np.ones(1)\n",
    "x = root(lambda x: t_x - t_x_for_constant_t_w(x, tau, t_0, t_w, a),\n",
    "         guess_value).x[0]\n",
    "print(f'x = {x:.3f} m')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-52"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "当热源温度为60 C, 烧伤深度为0.007 m\n",
      "当热源温度为70 C, 烧伤深度为0.009 m\n",
      "当热源温度为80 C, 烧伤深度为0.011 m\n",
      "当热源温度为90 C, 烧伤深度为0.012 m\n",
      "当热源温度为100 C, 烧伤深度为0.013 m\n"
     ]
    },
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEJCAYAAACT/UyFAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYA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xUT2mI872ft5M3CGmTUwsxr4/h0We5QvWKp0zLFVFst704F+wEL//bvw/Q/ymv+DkfXAh95EC6i2+MZ23LPAJDO7BcgCbvEkVeA8D7xhZiPwvX8fwTfPH8mv82bgaTN7BMjF9942InvMx33r/eycKzGzB/HN+ccAf3XO7fMyZKBV9Zh15q6ISJSJpKkeERGpABW/iEiUUfGLiEQZFb+ISJRR8YuIRBkVv4hIlFHxi5zAzFqZ2Sivc4gEiopf5NsuAPp+3xPMLMHM3jCzhmb2sZlNNbPq/q91MLOZ/uWyF5vZC/4TrURCgk7gEinHzM4BPsC3IFYucI1zbutJnncTvvWhyvzPbYFvwbiNwHLgJufcIv96Oq8Amc65p4MxBpEfouIXOYGZfQo85Jxb+z3PeQu4G9/SCW/h+yFxE77lda90zt1Q7rm1AZxzxwKZW6Si9OunyLd1wrfs80n5p3TqOOcO+x+6vNzXkoAd5Z+vwpdQo+IXKcfMEoDD/kWxxgDbgC5AB+B/gVuBr4AF3/EtMoA+J3zPJkA/59wnAQsuUgn6cFfkvyUDu/23j6+B3hHflb9uA17Ft4f/0Xf8/VnAWWZ2JoB/jv8pfFcJEwkJKn6R/7YBSDCztfjW+v8xvsse1sF3rd89QEf/xX6+xTmXj+8qcM+Z2Tf41kzPB/TBroQMfbgr8h3MrDswyTnXz8wWAPc551K9ziVyulT8IiJRRlM9IiJRRsUvIhJlVPwiIlFGxS8iEmVU/CIiUUbFLyISZVT8IiJRRsUvIhJlVPwiIlHm/wCAIkR7aiPwDAAAAABJRU5ErkJggg==\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "t_max = 48\n",
    "tau_s = 10\n",
    "t_w_list = np.arange(60, 110, 10)\n",
    "t_0 = 37\n",
    "tau_t = 5*60\n",
    "material = 'Water'\n",
    "\n",
    "T_0 = sc.convert_temperature(t_0, 'C', 'K')\n",
    "rho = psi('D', 'T', T_0, 'P', sc.atm, material)\n",
    "lambda_ = psi('L', 'T', T_0, 'P', sc.atm, material)\n",
    "c = psi('C', 'T', T_0, 'P', sc.atm, material)\n",
    "a = get_a(lambda_, rho, c)\n",
    "\n",
    "tau = tau_t - tau_s\n",
    "\n",
    "guess_value = 0.01\n",
    "x_list = []\n",
    "for t_w in t_w_list:\n",
    "    x = root(lambda x: t_max - t_x_for_constant_t_w(x, tau, t_0, t_w, a),\n",
    "             guess_value).x[0]\n",
    "    x_list.append(x)\n",
    "[print(f'当热源温度为{t_w} C, 烧伤深度为{x:.3f} m') for t_w, x in zip(t_w_list, x_list)]\n",
    "\n",
    "t_w_lt = np.linspace(60, 110, 1000)\n",
    "x_lt = []\n",
    "for t_w in t_w_lt:\n",
    "    x = root(lambda x: t_max - t_x_for_constant_t_w(x, tau, t_0, t_w, a),\n",
    "             guess_value).x[0]\n",
    "    x_lt.append(x)\n",
    "\n",
    "fig, ax = plt.subplots()\n",
    "ax.plot(t_w_lt, np.array(x_lt)*1000)\n",
    "ax.set_xlabel('$t_w$/°C')\n",
    "ax.set_ylabel('$x$/ mm')\n",
    "plt.show()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-53"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 2.0 s\n"
     ]
    }
   ],
   "source": [
    "t_w = 70\n",
    "t_0 = 25\n",
    "delta = 6e-3\n",
    "x = 2e-3\n",
    "t_x = 30\n",
    "a = 4e-7\n",
    "\n",
    "guess_value = np.ones(1)\n",
    "tau = root(lambda tau: t_x - t_x_for_constant_t_w(x, tau, t_0, t_w, a),\n",
    "           guess_value).x[0]\n",
    "print(f'tau = {tau:.1f} s')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-54"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "T = 410.19 C\n"
     ]
    }
   ],
   "source": [
    "t_0 = 25\n",
    "t_oo = 425\n",
    "shape = 'P'\n",
    "h = 6.5\n",
    "tau = 4 * sc.hour + 50 * sc.minute + 24\n",
    "length = 0.1\n",
    "rho = 810\n",
    "c = 2550\n",
    "lambda_ = 0.65\n",
    "l_c = length/2\n",
    "\n",
    "\n",
    "a = get_a(lambda_, rho, c)\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "eta = 1\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "ratio_s_to_0 = theta_to_theta_0_ratio(mu, eta, Fo, shape)\n",
    "ratio = ratio_s_to_0**3\n",
    "t = t_oo + (t_0 - t_oo) * ratio\n",
    "print(f't = {t:.2f} C')\n",
    "\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-55"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 8967 s\n"
     ]
    }
   ],
   "source": [
    "t_0 = 30\n",
    "t_oo = 5\n",
    "shape = ['P', 'C']\n",
    "h = 10\n",
    "t_m = 10\n",
    "d = 50e-3\n",
    "height = 120e-3\n",
    "material = 'Water'\n",
    "l_c_1 = height/2\n",
    "l_c_2 = d/2\n",
    "\n",
    "t_a = (t_0 + t_m)/2\n",
    "T_a = sc.convert_temperature(t_a, 'C', 'K')\n",
    "lambda_ = psi('L', 'T', T_a, 'P', sc.atm, material)\n",
    "rho = psi('D', 'T', T_a, 'P', sc.atm, material)\n",
    "c = psi('C', 'T', T_a, 'P', sc.atm, material)\n",
    "\n",
    "a = get_a(lambda_, rho, c)\n",
    "Bi_1 = get_Bi(l_c_1, lambda_, h)\n",
    "Bi_2 = get_Bi(l_c_2, lambda_, h)\n",
    "mu_1 = get_mu(Bi_1, shape[0])\n",
    "mu_2 = get_mu(Bi_2, shape[1])\n",
    "eta_1 = 0\n",
    "eta_2 = 0\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo_1 = get_Fo(tau, l_c_1, a)\n",
    "    ratio_m_to_0_1 = theta_to_theta_0_ratio(mu_1, eta_1, Fo_1, shape[0])\n",
    "    Fo_2 = get_Fo(tau, l_c_2, a)\n",
    "    ratio_m_to_0_2 = theta_to_theta_0_ratio(mu_2, eta_2, Fo_2, shape[1])\n",
    "    ratio_m_to_0 = ratio_m_to_0_1 * ratio_m_to_0_2\n",
    "    xpr = ratio_m_to_0 - (t_m - t_oo) / (t_0 - t_oo)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = np.ones(1)\n",
    "tau = root(expressions, guess_values).x[0]\n",
    "print(f'tau = {tau:.0f} s')\n",
    "\n",
    "Fo_1 = get_Fo(tau, l_c_1, a)\n",
    "Fo_2 = get_Fo(tau, l_c_2, a)\n",
    "check_Fo(Fo_1, Fo_2)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-56"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 9662 s\n"
     ]
    }
   ],
   "source": [
    "d = 0.15\n",
    "height = 0.05\n",
    "t_0 = 30\n",
    "t_oo = 450\n",
    "h = 9.5\n",
    "t_m = 400\n",
    "shape = ['P', 'C']\n",
    "l_c_1 = height/2\n",
    "l_c_2 = d/2\n",
    "\n",
    "lambda_ = 0.78\n",
    "rho = 2700\n",
    "c = 835\n",
    "\n",
    "a = get_a(lambda_, rho, c)\n",
    "Bi_1 = get_Bi(l_c_1, lambda_, h)\n",
    "Bi_2 = get_Bi(l_c_2, lambda_, h)\n",
    "mu_1 = get_mu(Bi_1, shape[0])\n",
    "mu_2 = get_mu(Bi_2, shape[1])\n",
    "eta_1 = 0\n",
    "eta_2 = 0\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo_1 = get_Fo(tau, l_c_1, a)\n",
    "    ratio_m_to_0_1 = theta_to_theta_0_ratio(mu_1, eta_1, Fo_1, shape[0])\n",
    "    Fo_2 = get_Fo(tau, l_c_2, a)\n",
    "    ratio_m_to_0_2 = theta_to_theta_0_ratio(mu_2, eta_2, Fo_2, shape[1])\n",
    "    ratio_m_to_0 = ratio_m_to_0_1 * ratio_m_to_0_2\n",
    "    xpr = ratio_m_to_0 - (t_m - t_oo) / (t_0 - t_oo)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = np.ones(1)\n",
    "tau = root(expressions, guess_values).x[0]\n",
    "print(f'tau = {tau:.0f} s')\n",
    "\n",
    "Fo_1 = get_Fo(tau, l_c_1, a)\n",
    "Fo_2 = get_Fo(tau, l_c_2, a)\n",
    "check_Fo(Fo_1, Fo_2)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-57"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 2358 s\n",
      "第3个Fo数为0.14，不满足Fo数大于0.2的公式使用条件，上述结果不可靠！\n"
     ]
    }
   ],
   "source": [
    "t_0 = 5\n",
    "t_oo = 180\n",
    "t_m = 80\n",
    "h = 20\n",
    "shape = ['P', 'P', 'P']\n",
    "l_1, l_2, l_3 = 40e-3, 60e-3, 100e-3\n",
    "l_c_1 = l_1/2\n",
    "l_c_2 = l_2/2\n",
    "l_c_3 = l_3/2\n",
    "material = 'Water'\n",
    "\n",
    "t_a = (t_0 + t_m)/2\n",
    "T_a = sc.convert_temperature(t_a, 'C', 'K')\n",
    "lambda_ = psi('L', 'T', T_a, 'P', sc.atm, material)\n",
    "rho = psi('D', 'T', T_a, 'P', sc.atm, material)\n",
    "c = psi('C', 'T', T_a, 'P', sc.atm, material)\n",
    "\n",
    "a = get_a(lambda_, rho, c)\n",
    "Bi_1 = get_Bi(l_c_1, lambda_, h)\n",
    "Bi_2 = get_Bi(l_c_2, lambda_, h)\n",
    "Bi_3 = get_Bi(l_c_3, lambda_, h)\n",
    "mu_1 = get_mu(Bi_1, shape[0])\n",
    "mu_2 = get_mu(Bi_2, shape[1])\n",
    "mu_3 = get_mu(Bi_3, shape[2])\n",
    "eta_1 = 0\n",
    "eta_2 = 0\n",
    "eta_3 = 0\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo_1 = get_Fo(tau, l_c_1, a)\n",
    "    ratio_m_to_0_1 = theta_to_theta_0_ratio(mu_1, eta_1, Fo_1, shape[0])\n",
    "    Fo_2 = get_Fo(tau, l_c_2, a)\n",
    "    ratio_m_to_0_2 = theta_to_theta_0_ratio(mu_2, eta_2, Fo_2, shape[1])\n",
    "    Fo_3 = get_Fo(tau, l_c_3, a)\n",
    "    ratio_m_to_0_3 = theta_to_theta_0_ratio(mu_3, eta_3, Fo_3, shape[2])\n",
    "    ratio_m_to_0 = ratio_m_to_0_1 * ratio_m_to_0_2 * ratio_m_to_0_3\n",
    "    xpr = ratio_m_to_0 - (t_m - t_oo) / (t_0 - t_oo)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = np.ones(1)\n",
    "tau = root(expressions, guess_values).x[0]\n",
    "print(f'tau = {tau:.0f} s')\n",
    "\n",
    "Fo_1 = get_Fo(tau, l_c_1, a)\n",
    "Fo_2 = get_Fo(tau, l_c_2, a)\n",
    "Fo_3 = get_Fo(tau, l_c_3, a)\n",
    "check_Fo(Fo_1, Fo_2, Fo_3)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-58"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Delta_t = 51 C\n"
     ]
    }
   ],
   "source": [
    "d = 10e-2\n",
    "height = 10e-2\n",
    "shape = ['P', 'C']\n",
    "t_0 = 260\n",
    "t_oo = 30\n",
    "h = 250\n",
    "tau = 3*60\n",
    "lambda_ = 47.5\n",
    "a = 9.55e-6\n",
    "\n",
    "l_c_1 = height/2\n",
    "l_c_2 = d/2\n",
    "\n",
    "Bi_1 = get_Bi(l_c_1, lambda_, h)\n",
    "Bi_2 = get_Bi(l_c_2, lambda_, h)\n",
    "mu_1 = get_mu(Bi_1, shape[0])\n",
    "mu_2 = get_mu(Bi_2, shape[1])\n",
    "Fo_1 = get_Fo(tau, l_c_1, a)\n",
    "Fo_2 = get_Fo(tau, l_c_2, a)\n",
    "ratio_m_to_0_1 = theta_to_theta_0_ratio(mu_1, 0, Fo_1, shape[0])\n",
    "ratio_m_to_0_2 = theta_to_theta_0_ratio(mu_2, 0, Fo_2, shape[1])\n",
    "ratio_m_to_0 = ratio_m_to_0_1 * ratio_m_to_0_2\n",
    "t_m = t_oo + (t_0 - t_oo) * ratio_m_to_0\n",
    "ratio_s_to_0_1 = theta_to_theta_0_ratio(mu_1, 1, Fo_1, shape[0])\n",
    "ratio_s_to_0_2 = theta_to_theta_0_ratio(mu_2, 1, Fo_2, shape[1])\n",
    "ratio_s_to_0 = ratio_s_to_0_1 * ratio_s_to_0_2\n",
    "t_s = t_oo + (t_0 - t_oo) * ratio_s_to_0\n",
    "Delta_t = t_m - t_s\n",
    "print(f'Delta_t = {Delta_t:.0f} C')\n",
    "\n",
    "check_Fo(Fo_1, Fo_2)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-60"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 39397 s\n"
     ]
    }
   ],
   "source": [
    "delta = 50e-3\n",
    "t_0 = 25\n",
    "t_w = 1600\n",
    "h = 40\n",
    "a = 5e-6\n",
    "lambda_ = 4.0\n",
    "t_x = 1500\n",
    "x = delta\n",
    "\n",
    "guess_values = 1000\n",
    "tau = root(lambda tau: t_x - t_x_for_constant_t_w(x, tau, t_0, t_w, a), guess_values).x[0]\n",
    "print(f'tau = {tau:.0f} s')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-62"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "t_m = 23.80 C\n",
      "q = 18489 W/m^2\n",
      "Q = 21730676 W/m\n"
     ]
    }
   ],
   "source": [
    "d = 1\n",
    "delta = 45e-3\n",
    "t_0 = -20\n",
    "t_oo = 80\n",
    "h = 400\n",
    "lambda_ = 43\n",
    "a = 1.17e-5\n",
    "\n",
    "tau = 5*60\n",
    "shape = 'P'\n",
    "l_c = delta\n",
    "\n",
    "Bi = get_Bi(l_c, lambda_, h)\n",
    "mu = get_mu(Bi, shape)\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "ratio_m_to_0 = theta_to_theta_0_ratio(mu, 0, Fo, shape)\n",
    "t_m = t_oo + (t_0 - t_oo) * ratio_m_to_0\n",
    "print(f't_m = {t_m:.2f} C')\n",
    "ratio_s_to_0 = theta_to_theta_0_ratio(mu, 1, Fo, shape)\n",
    "t_s = t_oo + (t_0 - t_oo) * ratio_s_to_0\n",
    "q = h*(t_oo - t_s)\n",
    "print(f'q = {q:.0f} W/m^2')\n",
    "Q_ratio_m_to_0 = 1 - ratio_m_to_0\n",
    "r_1 = d/2\n",
    "r_2 = d/2 - delta\n",
    "# rho * c = lambda_ / a\n",
    "Q_0 = np.pi * (r_1**2 - r_2**2) * lambda_ / a * (t_oo - t_0)\n",
    "Q = Q_0 * Q_ratio_m_to_0\n",
    "print(f'Q = {Q:.0f} W/m')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-63"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau_1 = 172 s\n",
      "Q_1 = 201 J\n",
      "可以用集中参数法，认为小球的内部的温度均匀一致。\n",
      "tau_2 = 4 s\n",
      "Q_2 = 603 J\n"
     ]
    }
   ],
   "source": [
    "shape = 'S'\n",
    "d = 10e-3\n",
    "t_0 = 450\n",
    "t_oo_1 = 25\n",
    "t_m_1 = 350\n",
    "h_1 = 10\n",
    "t_oo_2 = 25\n",
    "t_m_2 = 50\n",
    "h_2 = 6000\n",
    "rho = 3200\n",
    "c = 1200\n",
    "lambda_ = 18\n",
    "\n",
    "l_c = d/2\n",
    "a = get_a(lambda_, rho, c)\n",
    "Bi_1 = get_Bi(l_c, lambda_, h_1)\n",
    "mu_1 = get_mu(Bi_1, shape)\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau_1 = p\n",
    "    Fo_1 = get_Fo(tau_1, l_c, a)\n",
    "    ratio_m_to_0_1 = theta_to_theta_0_ratio(mu_1, 0, Fo_1, shape)\n",
    "    xpr = ratio_m_to_0_1 - (t_m_1 - t_oo_1) / (t_0 - t_oo_2)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = np.ones(1)\n",
    "tau_1 = root(expressions, guess_values).x[0]\n",
    "print(f'tau_1 = {tau_1:.0f} s')\n",
    "Fo_1 = get_Fo(tau_1, l_c, a)\n",
    "check_Fo(Fo_1)\n",
    "ratio_m_to_0_1 = theta_to_theta_0_ratio(mu_1, 0, Fo_1, shape)\n",
    "V = 4/3* np.pi * (d/2)**3\n",
    "Q_0 = V * rho * c * (t_0 - t_oo_1)\n",
    "Q_1 = (1 - ratio_m_to_0_1) * Q_0\n",
    "print(f'Q_1 = {Q_1:.0f} J')\n",
    "if Bi_1 < 0.1/3:\n",
    "    print(f'可以用集中参数法，认为小球的内部的温度均匀一致。')\n",
    "    t_0_2 = t_m_1\n",
    "\n",
    "    Bi_2 = get_Bi(l_c, lambda_, h_2)\n",
    "    mu_2 = get_mu(Bi_2, shape)\n",
    "\n",
    "\n",
    "    def expressions2(p):\n",
    "        tau_2 = p\n",
    "        Fo_2 = get_Fo(tau_2, l_c, a)\n",
    "        ratio_m_to_0_2 = theta_to_theta_0_ratio(mu_2, 0, Fo_2, shape)\n",
    "        xpr = ratio_m_to_0_2 - (t_m_2 - t_oo_2) / (t_0_2 - t_oo_2)\n",
    "        return xpr\n",
    "\n",
    "\n",
    "    guess_values2 = np.ones(1)\n",
    "    tau_2 = root(expressions2, guess_values2).x[0]\n",
    "    print(f'tau_2 = {tau_2:.0f} s')\n",
    "    Fo_2 = get_Fo(tau_2, l_c, a)\n",
    "    check_Fo(Fo_2)\n",
    "    ratio_m_to_0_2 = theta_to_theta_0_ratio(mu_2, 0, Fo_2, shape)\n",
    "    Q_0_2 = V * rho * c * (t_0_2 - t_oo_2)\n",
    "    Q_2 = (1 - ratio_m_to_0_2) * Q_0_2\n",
    "    print(f'Q_2 = {Q_2:.0f} J')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-65"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tau = 33220 s\n"
     ]
    }
   ],
   "source": [
    "shape = 'S'\n",
    "d = 60e-3\n",
    "t_0 = 350\n",
    "t_oo = 280\n",
    "lambda_ = 1.6\n",
    "a = 7e-7\n",
    "\n",
    "l_c = d/2\n",
    "\n",
    "Q_m_to_0 = 0.9\n",
    "theta_m_to_0 = 1 - Q_m_to_0\n",
    "mu = get_mu(l_c, shape)\n",
    "\n",
    "\n",
    "def expressions(p):\n",
    "    tau = p\n",
    "    Fo = get_Fo(tau, l_c, a)\n",
    "    xpr = theta_m_to_0 - theta_to_theta_0_ratio(mu, 0, Fo, shape)\n",
    "    return xpr\n",
    "\n",
    "\n",
    "guess_values = np.ones(1)\n",
    "tau = root(expressions, guess_values).x[0]\n",
    "print(f'tau = {tau:.0f} s')\n",
    "\n",
    "Fo = get_Fo(tau, l_c, a)\n",
    "check_Fo(Fo)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-71"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "outputs": [
    {
     "data": {
      "text/plain": "<Figure size 432x288 with 1 Axes>",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEGCAYAAAB7DNKzAAAAOXRFWHRTb2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qgP/C2mWX/ZtDnL+M2zoEgESiOr1wnAmuz881VFH/I8rar4mNm5YHPgHedc5O9zpORc+5OoAbwmJmV8DjOI8AU/54rgWYj8Jb/THoDvnWCLvI4E/gKbI5z7og/1wF86xh57jTbOAeCR4AU51wNoCEwPDs/EVFR/CER39+qMLNLgXTn3D5vIwUuMysHzAcec8695nWek8zsNjP7q//wILAf76/vdALuMLPF+P4nnhwIF0D97gDGwn+LvziwzctAfkuAK/0Xacvhu04RKEV76jbOgaAI8Kv/8U5gL3Aku948EE4xA4Jzbo2ZLTKzRCAU32m4nNlf8X0097iZPe4f6+ycO+RhJvBdO5nsv0vMgAedc55+dOecizv52F8W/QPkAijAW0CsmSUBDt8WxIFwzelDoAmQ4j8eEEAf85y6jXMgeAF408x64Pu9/ohzLtuKQjOzRUQkU/roSUREMqWiEBGRTKkoREQkUyoKERHJlIpCREQypaIQEZFMqShERCRTKgqRHGRmUYG0dLfI+VBRiGQD/6z+q/yPnzGzk6uKdgHmepdM5MJpCQ+R7PEE8JSZlQEaAd394x2AgWb2Pr4VUQsBDwI1gavxrdFTCRgB9ADqAH91zk3N3fgiZ6YzCpFs4Jw7ubbUQ8CNzrnjZhYOFAb6Alucc22Bm4Dm/pcVd851Bv4P31La1wB34VuoTyRgqChEsoF/y9VywFHn3H7/cCyQBFQDkgGcc5ucc6P931/p/+ceYK1/0btdQMFcii2SJSoKkQvkXwb7HXwfHR0ws07+b10NzMK3iUxz/3MvNbMp/u8H0jLVImekohC5AGZWGJgODHHOfYtvX+wn/N+u4d90ZxJwqZnFA1OA8Z6EFTlPWmZcREQypTMKERHJlIpCREQypaIQEZFMqShERCRTKgoREcmUikJERDKlohARkUz9P0X3ZSxXNw2sAAAAAElFTkSuQmCC\n"
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "t_0 = 20\n",
    "t_w = 1450\n",
    "x_list = np.linspace(0, 80e-3, 1000)\n",
    "tau = 2 * 3600\n",
    "a = 0.89e-6\n",
    "\n",
    "t_list = []\n",
    "for x in x_list:\n",
    "    t = t_x_for_constant_t_w(x, tau, t_0, t_w, a)\n",
    "    t_list.append(t)\n",
    "\n",
    "fig, ax = plt.subplots()\n",
    "ax.plot(x_list*100, t_list)\n",
    "ax.set_xlabel('$x$/cm')\n",
    "ax.set_ylabel('$t$/°C')\n",
    "plt.show()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "## 习题03-72"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "t_m = 311.17 C\n",
      "第1个Fo数为0.09，不满足Fo数大于0.2的公式使用条件，上述结果不可靠！\n"
     ]
    }
   ],
   "source": [
    "shape = ['P', 'C']\n",
    "d = 600e-3\n",
    "l = 1000e-3\n",
    "t_0 = 30\n",
    "t_oo = 1300\n",
    "tau = 1*3600\n",
    "h = 232\n",
    "lambda_ = 40.5\n",
    "a = 0.625e-5\n",
    "\n",
    "# 先考虑厚度方向，作为无限大平板进行分析\n",
    "l_c_1 = l / 2\n",
    "Bi_1 = h * l_c_1 / lambda_\n",
    "Fo_1 = a * tau / l_c_1**2\n",
    "mu_1 = get_mu(Bi_1, shape[0])\n",
    "eta_1 = 0\n",
    "ratio_m_to_0_1 = theta_to_theta_0_ratio(mu_1, eta_1, Fo_1, shape[0])\n",
    "\n",
    "# 再考虑径向，作为无限长圆柱进行分析\n",
    "l_c_2 = d / 2\n",
    "Bi_2 = h * l_c_2 / lambda_\n",
    "Fo_2 = a * tau / l_c_2**2\n",
    "mu_2 = get_mu(Bi_2, shape[1])\n",
    "eta_2 = 0\n",
    "ratio_m_to_0_2 = theta_to_theta_0_ratio(mu_2, eta_2, Fo_2, shape[1])\n",
    "\n",
    "ratio_m_to_0 = ratio_m_to_0_1 * ratio_m_to_0_2\n",
    "t_m = t_oo + ratio_m_to_0 * (t_0 - t_oo)\n",
    "print(f't_m = {t_m:.2f} C')\n",
    "\n",
    "check_Fo(Fo_1, Fo_2)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.13"
  },
  "latex_envs": {
   "LaTeX_envs_menu_present": true,
   "autoclose": false,
   "autocomplete": true,
   "bibliofile": "biblio.bib",
   "cite_by": "apalike",
   "current_citInitial": 1,
   "eqLabelWithNumbers": true,
   "eqNumInitial": 1,
   "hotkeys": {
    "equation": "Ctrl-E",
    "itemize": "Ctrl-I"
   },
   "labels_anchors": false,
   "latex_user_defs": false,
   "report_style_numbering": false,
   "user_envs_cfg": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}